<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<style>
</style>
<body>

  <div id="outer">
    hello
  </div>

  <script>
    Object.prototype.outerHTML = function() {
      let inner = this.innerHTML;
      outer = this.appendChild(inner);
      alert(outer)
    }

    const con = document.getElementById('outer')
    alert(con.outerHTML)
    alert(con.innerHTML)
    
  </script>
  
</body>
</html>